<?php include './application/views/top.php'; ?>
<div class="clear"></div>
<div style="width: 100%;height:240px;background: url(/resource/images/zbj/zbj_banner.jpg)"></div>
<div class="layout search">
	<div class="title">
    	<i class="t1"></i>
    	<h3>筛选投资项目</h3>
        <span></span>
    </div>
	<div class="content">
    <form id="bform" action="" method="get">
    	<dl>
        	<dt><span>标的类型:</span></dt>
            <dd>
            	<a href="javascript:void(0);" onclick="setFtype(0);"><?php if ($postArr['sftype'] == 0) { ?><span><?php } ?>不限<?php if ($postArr['sftype'] == 0) { ?></span><?php } ?></a>
                <?php foreach ($borrow_type as $fk => $fv): ?>
            	<a href="javascript:void(0);" onclick="setFtype(<?php echo $fk; ?>);"><?php if($postArr['sftype'] == $fk) { ?><span><?php } ?><?php echo $fv;?><?php if ($postArr['sftype'] == $fk) { ?></span><?php } ?></a>
                <?php endforeach; ?>
            </dd>
        </dl>
    	<dl>
        	<dt><span>投资金额:</span></dt>
            
            <dd>
            	<a href="javascript:void(0);" onclick="setAccount(0);"><?php if ($postArr['saccount'] == 0) { ?><span><?php } ?>不限<?php if ($postArr['saccount'] == 0) { ?></span><?php } ?></a>
                <?php foreach ($borrow_account as $ak => $av): ?>
            	<a href="javascript:void(0);" onclick="setAccount(<?php echo $ak; ?>);"><?php if($postArr['saccount'] == $ak) { ?><span><?php } ?><?php echo $av;?><?php if ($postArr['saccount'] == $ak) { ?></span><?php } ?></a>
                <?php endforeach; ?>
            </dd>
        </dl>
		<dl>
        	<dt><span>年化利率:</span></dt>            
            <dd>
            	<a href="javascript:void(0);" onclick="setApr(0);"><?php if ($postArr['sapr'] == 0) { ?><span><?php } ?>不限<?php if ($postArr['sapr'] == 0) { ?></span><?php } ?></a>
                <?php foreach ($borrow_apr as $bk => $bv): ?>
            	<a href="javascript:void(0);" onclick="setApr(<?php echo $bk; ?>);"><?php if($postArr['sapr'] == $bk) { ?><span><?php } ?><?php echo $bv;?><?php if ($postArr['sapr'] == $bk) { ?></span><?php } ?></a>
                <?php endforeach; ?>
            </dd>
        </dl>
		<dl class="nb">
        	<dt><span>借款期限:</span></dt>
            
            <dd>
            	<a href="javascript:void(0);" onclick="setLimit(0);"><?php if ($postArr['slimit'] == 0) { ?><span><?php } ?>不限<?php if ($postArr['slimit'] == 0) { ?></span><?php } ?></a>
                <?php foreach ($borrow_time_limit as $lk => $lv): ?>
            	<a href="javascript:void(0);" onclick="setLimit(<?php echo $lk; ?>);"><?php if($postArr['slimit'] == $lk) { ?><span><?php } ?><?php echo $lv;?><?php if ($postArr['slimit'] == $lk) { ?></span><?php } ?></a>
                <?php endforeach; ?>
            </dd>
        </dl>
        <input type="hidden" id="sftype" name="sftype" value="<?php echo $postArr['sftype']; ?>">
        <input type="hidden" id="saccount" name="saccount" value="<?php echo $postArr['saccount']; ?>">
        <input type="hidden" id="sapr" name="sapr" value="<?php echo $postArr['sapr']; ?>">
        <input type="hidden" id="slimit" name="slimit" value="<?php echo $postArr['slimit']; ?>">
        <input type="hidden" id="srate" name="srate" value="<?php echo $postArr['srate']; ?>">
	</form>
	</div>
</div
><div class="clear h30"></div>
<div class="layout lists">
	<!-- S 标题 -->
	<div class="title">
    	<i class="t2"></i>
    	<h3>热门理财列表</h3>
        <span></span>
    </div>
	<!-- E 标题 -->
    <div class="content">
    	<!-- S 左 -->
        <div class="left">
            <ul class="tbt">
                <li class="xmxq"><span>项目详情</span></li>
                <li class="nhsy">年化收益</li>
                <li class="xmje">项目金额</li>
                <li class="bzfs">保障方式</li>
                <li class="qx">期限</li>
                <li class="fbsj">发标时间</li>
                <li class="jd">进度</li>
                <li class="nul">&nbsp;</li>
            </ul>
            <?php $l=0; foreach($borrow_list as $list):?>
            <?php $user_list = $this->User_model->get_by_uid($list['user_id']);?>
            <ul class="tbc">
                <li class="xmxq"><span class="c_yh"><a href="/borrow/obj/<?php echo $list['id'];?>"><?php echo mb_substr($list['title'],0,16);?></a></span></li>
                <li class="nhsy"><span><b><?php echo $list['apr'];?></b>%</span></li>
                <li class="xmje"><span><?php echo $list['account'];?></span></li>
                <li class="bzfs">
                	<?php if($user_list['real_status'] == 1 ){ ?>
                    <a href="javascript:void;" title="实名认证"><i class="r1y"></i></a>
                    <?php }else{ ?>
                    <a href="javascript:void;" title="实名认证"><i class="r1n"></i></a>
                    <?php } ?>
                    <?php if($user_list['phone_status'] == 1 ){ ?>
                    <a href="javascript:void;" title="手机认证"><i class="sjy"></i></a>
                    <?php }else{ ?>
                    <a href="javascript:void;" title="手机认证"><i class="sjn"></i></a>
                    <?php } ?>
                    <?php if($user_list['email_status'] == 1 ){ ?>
                    <a href="javascript:void;" title="邮箱认证"><i class="yxy"></i></a>
                    <?php }else{ ?>
                    <a href="javascript:void;" title="邮箱认证"><i class="yxn"></i></a>
                    <?php } ?>
                </li>
                <li class="qx"><?php echo $list['is_day'] ? "{$list['time_limit_day']}天" : "{$list['time_limit']}个月"?></li>
                <li class="fbsj"><span>发标时间 : <?php echo date("Y年m月d日 H:i",$list['verify_time']);?><span></li>
                <li class="jd">
                	<div style="margin-top:8px;">
                	<div class="box" id="tz<?php echo $l;?>"></div>
                    </div>
                    <script>box("tz<?php echo $l;?>",<?php echo intval(($list['account_yes']/$list['account'])*100);?>);</script>
				</li>
                <li class="nul"><span><a href="/borrow/obj/<?php echo $list['id'];?>.html" class="ljtb_an"><?php echo borrowStatus($list);?></a></span></li>
            </ul>
			<?php $l++; if( $l === 10 ) break; endforeach;?>
        </div>
	</div>
</div>
<div class="clear h30"></div>
<div class="layout">
	<div class="page">
		<div class="pagination">
    	<?php echo $this->pagination->create_links();?>

        <!--
        	<ul><li><span>首页</span></li><li><span>上一页</span></li><li><span class="currentpage">1</span></li>
                <li><a href="#"><span>2</span></a></li>
                <li><span>下一页</span></li><li><span>末页</span></li>
			</ul>
        -->

		</div>
	</div>
</div>
<div class="clear h20"></div>
<?php include "./application/views/footer.php";?>
